package com.popcorn.login.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.popcorn.action.Action;
import com.popcorn.action.ActionForward;

public class LogoutAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		HttpSession session=request.getSession();
		session.invalidate();
		
		ActionForward forward= new ActionForward();
	   	forward.setRedirect(false);
   		forward.setPath("../main/main.jsp");
   		return forward;
	}
}
